namespace JGSY.CMS.LowCode.Platform.Application.DTOs
{
    /// <summary>
    /// 批量实例操作请求
    /// </summary>
    public class BatchInstanceOperationRequest
    {
        /// <summary>
        /// 实例ID列表
        /// </summary>
        public List<long> InstanceIds { get; set; } = new();

        /// <summary>
        /// 操作类型 (stop/retry/delete)
        /// </summary>
        public string Operation { get; set; } = string.Empty;

        /// <summary>
        /// 操作原因
        /// </summary>
        public string? Reason { get; set; }
    }

    /// <summary>
    /// 批量操作结果
    /// </summary>
    public class BatchOperationResult
    {
        /// <summary>
        /// 成功数量
        /// </summary>
        public int SuccessCount { get; set; }

        /// <summary>
        /// 失败数量
        /// </summary>
        public int FailCount { get; set; }

        /// <summary>
        /// 成功的实例ID
        /// </summary>
        public List<long> SuccessIds { get; set; } = new();

        /// <summary>
        /// 失败的操作记录
        /// </summary>
        public List<OperationFailure> FailedOperations { get; set; } = new();
    }

    /// <summary>
    /// 操作失败信息
    /// </summary>
    public class OperationFailure
    {
        /// <summary>
        /// 实例ID
        /// </summary>
        public long InstanceId { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string ErrorMessage { get; set; } = string.Empty;
    }
}
